package com.example.demo.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.example.demo.po.Menu;
import com.example.demo.po.User;
import com.example.demo.service.MenuService;
import com.example.demo.service.UserService;

@Controller
@RequestMapping("/admin")
public class UserController {
	
	@Autowired
	private UserService userService;
	
	@RequestMapping("/adminUser.action")
	public String list(Model model) {

		List<User> users = userService.selectAll();
	
		model.addAttribute("users", users);

		return "admin/menu/menuList";
	}

}
